---
sidebar_position: 1
sidebar_class_name: hidden
---

# Chat models

<!-- This file is autogenerated. Do not edit directly. -->
<!-- See `scripts/model-docs.table.js` for details -->

## Features (natively supported)

All ChatModels implement the Runnable interface, which comes with default implementations of all methods, ie. `invoke`, `batch`, `stream`. This gives all ChatModels basic support for invoking, streaming and batching, which by default is implemented as below:

- _Streaming_ support defaults to returning an `AsyncIterator` of a single value, the final result returned by the underlying ChatModel provider. This obviously doesn't give you token-by-token streaming, which requires native support from the ChatModel provider, but ensures your code that expects an iterator of tokens can work for any of our ChatModel integrations.
- _Batch_ support defaults to calling the underlying ChatModel in parallel for each input. The concurrency can be controlled with the `maxConcurrency` key in `RunnableConfig`.
- _Map_ support defaults to calling `.invoke` across all instances of the array which it was called on.

Each ChatModel integration can optionally provide native implementations to truly enable invoke, streaming or batching requests.

Additionally, some chat models support additional ways of guaranteeing structure in their outputs by allowing you to pass in a defined schema.
[Function calling and parallel function calling](/docs/modules/model_io/chat/function_calling) (tool calling) are two common ones, and those capabilities allow you to use the chat model as the LLM in [certain types of agents](/docs/modules/agents/agent_types/).
Some models in LangChain have also implemented a `withStructuredOutput()` method that unifies many of these different ways of constraining output to a schema.

The table shows, for each integration, which features have been implemented with native support.

| Model                   | Invoke | Stream | Batch | Function Calling | Tool Calling | `withStructuredOutput()` |
| :---------------------- | :----: | :----: | :---: | :--------------: | :----------: | :----------------------: |
| BedrockChat             |   ✅   |   ✅   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatAlibabaTongyi       |   ✅   |   ❌   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatAnthropic           |   ✅   |   ✅   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatAnthropicTools      |   ✅   |   ✅   |  ✅   |        ❌        |      ✅      |            ✅            |
| ChatBaiduWenxin         |   ✅   |   ❌   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatCloudflareWorkersAI |   ✅   |   ✅   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatCohere              |   ✅   |   ✅   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatFireworks           |   ✅   |   ✅   |  ✅   |        ✅        |      ❌      |            ❌            |
| ChatGoogleGenerativeAI  |   ✅   |   ✅   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatGoogleVertexAI      |   ✅   |   ✅   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatGooglePaLM          |   ✅   |   ❌   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatGroq                |   ✅   |   ✅   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatLlamaCpp            |   ✅   |   ✅   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatMinimax             |   ✅   |   ❌   |  ✅   |        ✅        |      ❌      |            ❌            |
| ChatMistralAI           |   ✅   |   ❌   |  ✅   |        ❌        |      ✅      |            ✅            |
| ChatOllama              |   ✅   |   ✅   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatOpenAI              |   ✅   |   ✅   |  ✅   |        ✅        |      ✅      |            ✅            |
| ChatTogetherAI          |   ✅   |   ✅   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatYandexGPT           |   ✅   |   ❌   |  ✅   |        ❌        |      ❌      |            ❌            |
| ChatZhipuAI             |   ✅   |   ❌   |  ✅   |        ❌        |      ❌      |            ❌            |
